#include <stdio.h>
int main()
{
int f[65],i,j,t = 1, s = 1;
f[1]=1;
for (i=2;i<=64;)
{
t++;
s<<=1;
for(j=i;j<i+t;j++)
{
if(j>64)break;
f[j]=f[j-1]+s;
}
i=j;
}
while (scanf("%d",&i)!=EOF)
printf("%d\n", f[i]);
}
